﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="dialog_group.aspx.cs" Inherits="DTcms.Web.admin.dialog.dialog_group" %>
<%@ Import namespace="DTcms.Common" %>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>订单发货窗口</title>
<link href="../skin/default/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="../../scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="../js/common.js"></script>
<script type="text/javascript">
    var api = top.dialog.get(window); //获取窗体对象
    var W = api.data; //获取父对象
    //页面加载完成执行
    $(function () {
        //设置按钮及事件
        api.button([{
            value: '确定',
            callback: function () {
                submitForm();
            },
            autofocus: true
        }, {
            value: '取消',
            callback: function () { }
        }]);
    });

    //提交表单处理
    function submitForm() {
        var currDocument = $(document); //当前文档

        //验证表单
        if ($("#ddlGroupId").val() == "") {
            top.dialog({
                title: '提示',
                content: '请选择要升级的会员等级！',
                okValue: '确定',
                ok: function () { },
                onclose: function () {
                    $("#ddlGroupId", currDocument).focus();
                }
            }).showModal(api);
            return false;
        }
        //验证表单
        if ($("#txtRemark").val() == "") {
            top.dialog({
                title: '提示',
                content: '请填写备注说明！',
                okValue: '确定',
                ok: function () { },
                onclose: function () {
                    $("#txtRemark", currDocument).focus();
                }
            }).showModal(api);
            return false;
        }
        //组合参数
        var postData = {
            "user_id": $("#hidUserID", W.document).val(),
            "group_id": $("#ddlGroupId").val(),
            "txt_remark": $("#txtRemark").val()
        };
        //发送AJAX请求
        W.sendAjaxUrl(api, postData, "../../tools/admin_ajax.ashx?action=edit_user_group");
        return false;
    }
</script>
</head>

<body>
<form id="form1" runat="server">
<div class="div-content">
  <dl>
    <dt>会员等级</dt>
    <dd>
      <div class="rule-single-select">
        <asp:DropDownList id="ddlGroupId" runat="server"></asp:DropDownList>
      </div>
    </dd>
  </dl>
  <dl>
    <dt>备注说明</dt>
    <dd><asp:TextBox ID="txtRemark" runat="server" Height="150px" CssClass="input" TextMode="MultiLine" datatype="*0-255" sucmsg=" "></asp:TextBox></dd>
  </dl>
</div>
</form>
</body>
</html>

